﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FTradeReceivablesEdit.aspx.cs" Inherits="IHISCETeim.Web.MachineSys.FTradeModel.FTradeReceivablesEdit" %>

<div class="pageContent">
	<form method="post" action="FTradeModel/FTradeReceivablesEdit.aspx?ajaxmethod=edit&FTradeID=<%=FTradeID %>" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
		<div class="pageFormContent" layoutH="56">
                <h2 style=" padding:0px 0px 5px 6px; border-bottom:1px solid #B8D0D6;">基本信息</h2>
			        <p>
				    <label>合 同 号：</label>
				    <input name="HeTongHao" type="text" class="required" value="<%=obj.HeTongHao %>"  />
			        </p>
			        <p>
				        <label>销售时间：</label>
				        <input name="XiaoShouShiJian" class="required date" type="text" value="<%=obj.XiaoShouShiJian.ToString("yyyy-MM-dd") %>"  alt="请输入销售时间"/>
			        </p>
			        <p>
				        <label>经 销 商：</label>
                        <input name="JingXiaoShang" type="text" value="<%=obj.JingXiaoShang %>"  class="required textInput autocomplete" autocompletehref="<%=AutoCompleteRequestUrl %>?ajaxmethod=getagentlist" swidth="300"/>
			        </p>
                    <p>
				        <label>营业经理：</label>
				        <input name="YingYeJingLi" class="required" type="text"  value="<%=obj.YingYeJingLi %>" alt="请输入营业经理"/>
			        </p>
                    <div class="divider"></div>
			        <p>
				        <label>型    号：</label>
                        <%=GetMacType("select", "XingHao", obj.XingHao)%>
			        </p>
                    <p>
				        <label>机    号：</label>
				        <input id="FTradeReceivablesEdit_JiHao" name="JiHao" class="required" type="text" size="" alt=""  value="<%=obj.JiHao %>"/>
			             <span class="info" style="color:Red!important;" id="FTradeReceivablesEdit_JiHao_Hit"></span>
                    </p>
                    <script>
                        $(document).ready(function () {
                            $("#FTradeReceivablesEdit_JiHao").blur(function () {
                                var $data = {};
                                var $this = $(this);
                                $data["JiHao"] = $this.val();
                                var url = "/MachineSys/sysAjaxDone.ashx?ajaxmethod=ftradereceivablescheckjihao&FTradeID=<%=FTradeID %>"
                                $.ajax({
                                    type: 'post',
                                    url: url,
                                    data: $data,
                                    async: false,
                                    cache: false,
                                    success: function (json) {
                                        $("#FTradeReceivablesEdit_JiHao_Hit").html(json);
                                        if (json != "") {
                                            $("#FTradeReceivablesEdit_BtnSave").hide();
                                        }
                                        else {
                                            $("#FTradeReceivablesEdit_BtnSave").show();
                                        }
                                    }
                                });
                            });
                        })
                    </script>
                    <div class="divider"></div>
			        <p>
				        <label>单    价：</label>
				        <input id="FTradeReceivablesEdit_Price" name="Price" class="required inputFloat" readonly type="text" value="<%=obj.Price %>" size="" alt=""/>
                        <span class="unit">元</span>
			        </p>
                    <p>
				        <label>GPS费 用：</label>
				        <input id="FTradeReceivablesEdit_GPSFeiYong" name="GPSFeiYong" class="required inputFloat" readonly type="text" value="<%=obj.GPSFeiYong %>" size="" alt=""/>
                        <span class="unit">元</span>
			        </p>
                    <p>
				        <label>月促销折让金额：</label>                      
                        <input id="FTradeReceivablesEdit_YueCuXiaoJinE" name="YueCuXiaoJinE" class="required inputFloat" readonly type="text" value="<%=obj.YueCuXiaoJinE %>" size="" alt=""/>
                        <span class="unit">元</span>
			        </p>
                     <p>
				        <label>GPS 号：</label>
				        <input name="GPSNum" class="" type="text" value="<%=obj.GPSNum %>" size="" alt=""/>
			        </p>
                    <p>
				        <label>利息收入：</label>
				        <input  name="InterestIncome" class="required inputFloat" type="text" value="<%=obj.InterestIncome %>" size="" alt=""/>
                        <span class="unit">元</span>
			        </p>
                    <script type="text/javascript">
                        $(document).ready(function () {
                            $("#FTradeReceivablesEdit_Price,#FTradeReceivablesEdit_GPSFeiYong,#FTradeReceivablesEdit_YueCuXiaoJinE").change(function () {
                                if ($(this).val() == "")
                                    $(this).val(0);
                                var Price = parseFloat($("#FTradeReceivablesEdit_Price").val());
                                var GPSFeiYong = parseFloat($("#FTradeReceivablesEdit_GPSFeiYong").val());
                                var YueCuXiaoJinE = parseFloat($("#FTradeReceivablesEdit_YueCuXiaoJinE").val());

                                $("#FTradeReceivablesEdit_HeTongJinE").val(Price + GPSFeiYong + YueCuXiaoJinE);

                            })
                        })
                    </script>
                    <div class="divider"></div>
			        <p>
				        <label>合同金额：</label>
				        <input  name="HeTongJinE" class="required inputFloat" type="text" readonly value="<%=obj.HeTongJinE %>"  size="" alt=""/>
                        <span class="unit">万元</span>
			        </p>
                    <p>
				        <label>返还利息额：</label>
				        <input  name="FanHuanLiXi" class="inputFloat" type="text" value="<%=obj.FanHuanLiXi %>" size="" alt=""/>
                        <span class="unit">元</span>
			        </p>                   
                    <p>
				        <label>到期日：</label>
				        <input name="DaoQiRi" class="" type="text" readonly value="<%=obj.DaoQiRi %>" alt=""/>
			        </p>
                    <%-- <div style="clear:both;height:40px; background-color:Yellow; ">
                       
                         <p>
				            <label>外币金额：</label>
				            <input name="CurrencyAmount" class="inputFloat" type="text" value="<%=obj.CurrencyAmount %>"readonly alt=""/>
                            &nbsp;<input  name="Currency" class="" type="text" size="3" value="<%=obj.Currency %>"readonly alt=""/>
			            </p>
                        <p>
				            <label>外币汇率：</label>
				            <input name="Rate" class="inputFloat" type="text" value="<%=obj.Rate %>" readonly alt=""/>
                        </p>
                    </div>--%>
                    <div style="clear:both;"></div>
            
				    <label>合同付款条款：</label>
				    <textarea name="FuKuanTiaoKuan" cols="80" rows="4" ><%=obj.FuKuanTiaoKuan%></textarea>
                    <div style="clear:both;margin-bottom: 5px;"></div>
               
                  <h2 style=" padding:10px 0px 5px 6px; border-bottom:1px solid #B8D0D6;">收款条款</h2>
                
                    <div style="clear:both;margin-bottom: 5px;"></div>
                    <label>请选择收款条款：</label>
                    <input name="XiaoShouLeiXing" class="" type="text" value="<%=obj.XiaoShouLeiXing %>" readonly alt=""/>
                    <div style="clear:both;"></div>
                    <div id="FTradeReceivablesEdit_ShowXXLSPage" style=" border:1px dotted #B8D0D6;  margin:5px 0px; ">
                        <%--显示显示销售对应的配置--%>
                    </div>
                    <script type="text/javascript">
                        $(document).ready(function () {


                            function changeXiaoShouLeiXingEdit(FTradeSalesId) {
                              //  key = encodeURI(key);
                                var url = "FTradeModel/GetPageFTradeSaleTypeConfigView.aspx?FTradeSalesId=" + FTradeSalesId + "&CanSuspend=true"
                                $("#FTradeReceivablesEdit_ShowXXLSPage").loadUrl(url);

                            }
                            changeXiaoShouLeiXingEdit("<%=obj.FTradeSalesId %>");
                        })
            </script>

                   <div style="clear:both;margin-bottom: 5px;"></div>
                   <%--<h2 style=" padding:10px 0px 5px 6px; border-bottom:1px solid #B8D0D6;">开票信息</h2>
                   <p>
				        <label>普票开票日期：</label>
				        <input name="PPKPRiQi" class="date" type="text" value="<%=obj.PPKPRiQi %>" alt=""/>
			        </p>
                    <p>
				        <label>普票开票号码：</label>
				        <input name="PPKPHaoMa" class="" type="text" value="<%=obj.PPKPHaoMa %>" alt=""/>
			        </p>
                    <p>
				        <label>普票开票金额：</label>
				        <input name="PPKPJinE" class="inputFloat" type="text" value="<%=obj.PPKPJinE %>" alt=""/>
			        </p>
                    <div class="divider"></div>
                    <p>
				        <label>专票开票日期：</label>
				        <input name="ZPKPRiQi" class="date" type="text" value="<%=obj.ZPKPRiQi %>" alt=""/>
			        </p>
                    <p>
				        <label>专票开票号码：</label>
				        <input name="ZPKPHaoMa" class="" type="text" value="<%=obj.ZPKPHaoMa %>" alt=""/>
			        </p>
                    <p>
				        <label>专票开票金额：</label>
				        <input name="ZPKPJinE" class="inputFloat" type="text" value="<%=obj.ZPKPJinE %>" alt=""/>
			        </p>
                    <div class="divider"></div>
                    <p>
				        <label>发票签收人：</label>
				        <input name="FaPiaoQianShouRen" class="" type="text" value="<%=obj.FaPiaoQianShouRen %>" alt=""/>
			        </p>
                    <div style="clear:both;margin-bottom: 5px;"></div>--%>
                    <h2 style=" padding:10px 0px 5px 6px; border-bottom:1px solid #B8D0D6;">终端信息</h2>
                    <p>
				        <label>终端销售状态：</label>
				        <input name="ZDXiaoShouState" class="" type="text" value="<%=obj.ZDXiaoShouState %>" alt=""/>
			        </p>
                    <p>
				        <label>终端用户：</label>
				        <input name="ZDYongHu" class="" type="text" value="<%=obj.ZDYongHu %>" alt=""/>
			        </p>
                    <p>
				        <label>终端销售时间：</label>
				        <input name="ZDXiaoShouShiJian" class="" type="text" value="<%=obj.ZDXiaoShouShiJian %>" alt=""/>
			        </p>
                    <p>
				        <label>终端售价：</label>
				        <input name="ZDShouJia" class="inputFloat" type="text" value="<%=obj.ZDShouJia %>" alt=""/>
			        </p>
		</div>
		<div class="formBar">
			<ul>
				<!--<li><a class="buttonActive" href="javascript:;"><span>保存</span></a></li>-->
				<li id="FTradeReceivablesEdit_BtnSave"><div class="buttonActive"><div class="buttonContent"><button type="submit" >保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
	</form>
   
</div>
 